﻿using AutoMapper;
using DataLayer;
using DataLayer.Model;
using GameUpWS.DTOs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameUp
{
    public class ExampleService
    {





        public static PlayerDTO GetPlayerInfo(int IdPlayer)
        {
            using (UnitOfWork repository = new UnitOfWork())
            {
                Player player = repository.PlayerRepository.GetById(IdPlayer);
                var playerDTO = Mapper.Map<PlayerDTO>(player);

                return playerDTO;
            }
        }
    }
}
